<template>
  <page-header-wrapper :title="false">
    <a-card>
      <div class="table-page-search-wrapper">
        <a-form layout="inline">
          <a-row :gutter="48">
            <a-col :md="8" :sm="24">
              <a-form-item label="退库日期">
                <a-range-picker :value="value4" />
              </a-form-item>
            </a-col>
            <a-col :md="6" :sm="24">
              <a-form-item label="筛选">
                <a-input :value="value" placeholder="请输入" />
              </a-form-item>
            </a-col>
            <a-col :md="(!advanced && 8) || 24" :sm="24">
              <span
                class="table-page-search-submitButtons"
                :style="(advanced && { float: 'right', overflow: 'hidden' }) || {}"
              >
                <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
                <a-button style="margin-left: 8px" @click="() => (queryParam = {})">重置</a-button>
                <!-- <a @click="toggleAdvanced" style="margin-left: 8px">
                    {{ advanced ? '收起' : '展开' }}
                    <a-icon :type="advanced ? 'up' : 'down'"/>
                  </a> -->
              </span>
            </a-col>
          </a-row>
        </a-form>
      </div>
      <a-table 
        ref="table" 
        size="default" 
        rowKey="key" 
        :columns="columns" 
        :scroll="{ x: 1920 }"  
        :data-source="loadData">
        <span slot="serial" slot-scope="text, record, index">
          {{ index + 1 }}
        </span>
      </a-table>
    </a-card>
  </page-header-wrapper>
</template>
  
  <script>
export default {
  name: 'DayReportDetails',
  data() {
    return {
      mdl: null,
      visible: false,
      value: '',
      value4: '',
      confirmLoading: false,
      // 高级搜索 展开/关闭
      advanced: false,
      // 查询参数
      queryParam: {},
      // 表头
      columns: [
        {
          title: '订单ID',
          width:120,
          dataIndex: 'orderId',
        },
        {
          title: '入库日期',
          width:120,
          dataIndex: 'inDate',
        },
        {
          title: '类型',
          width:120,
          dataIndex: 'type',
        },
        {
          title: '商品名',
          width:160,
          dataIndex: 'goodsName',
        },
        {
          title: '品牌',
          width:120,
          dataIndex: 'brandName',
        },
        {
          title: '一级分类',
          width:120,
          dataIndex: 'topName',
        },
        {
          title: '二级分类',
          width:120,
          dataIndex: 'subName',
        },
        {
          title: '串码1',
          width:120,
          dataIndex: 'phoneCode1',
        }, {
          title: '串码2',
          width:120,
          dataIndex: 'phoneCode2',
        }, {
          title: '销售日期',
          width:120,
          dataIndex: 'salesDate',
        }, {
          title: '成本(元)',
          width:120,
          dataIndex: 'commCost',
        }, {
          title: '赠品成本',
          width:120,
          dataIndex: 'giftCommCost',
        }, {
          title: '售价',
          width:120,
          dataIndex: 'price',
        }, {
          title: '零售价',
          width:120,
          dataIndex: 'retailPrice',
        }, {
          title: '毛利',
          width:120,
          dataIndex: 'grossProfit',
        }, {
          title: '考核成本',
          width:120,
          dataIndex: 'assCost',
        }, {
          title: '赠品考核成本',
          width:120,
          dataIndex: 'giftAssCost',
        }, {
          title: '考核毛利',
          width:120,
          dataIndex: 'assCostProfit',
        }, {
          title: '提成比例',
          width:120,
          dataIndex: 'propWage',
        }, {
          title: '固定提成',
          width:120,
          dataIndex: 'fixWage',
        }, {
          title: '提成',
          width:120,
          dataIndex: 'commission',
        }, {
          title: '销售员',
          width:120,
          dataIndex: 'empName',
        }, {
          title: '销售店员',
          width:120,
          dataIndex: 'storeName',
        }, {
          title: '供应商',
          width:120,
          dataIndex: 'supplyName',
        }, {
          title: '渠道',
          width:120,
          dataIndex: 'channelName',
        }, {
          title: '会员姓名',
          width:120,
          dataIndex: 'memName',
        }, {
          title: '会员电话',
          width:120,
          dataIndex: 'phone',
        }, {
          title: '备注',
          width:120,
          dataIndex: 'memo',
        },
      ],
      // 加载数据方法 必须为 Promise 对象
      loadData: [
        {
          orderId: '11',
          inDate: '2023-09-31',
          type: '1',
          goodsName: '华为P60 12+256G玫瑰红',
          brandName: '小米',
          topName: '手机',
          subName: '5G手机',
          phoneCode1: '1',
          phoneCode2: '',
          salesDate: '2023-010-09',
          commCost: '100',
          giftCommCost: '10',
          price: '100',
          retailPrice: '100',
          grossProfit: '20',
          assCost: '10',
          giftAssCost: '10',
          assCostProfit: '10',
          propWage: '10%',
          fixWage: '10',
          commission: '10',
          empName: '王升',
          storeName: '达臻贸易王升',
          supplyName: '华为旗舰店',
          channelName: '测试渠道',
          memName: '测试会员',
          phone: '19136911230',
          memo: '111'
        }
      ],
    }
  },
  methods: {},
}
</script>